import { ProCard, ProColumns, ProForm, ProFormDatePicker, ProFormSelect, ProFormText, ProFormTextArea, ProTable } from "@ant-design/pro-components";
import { Col, Row } from "antd";

const App:React.FC=()=>{
    interface DataType{
        sno?:number,code?:string,name?:string,type?:string,status?:string,sop?:string,operater_name?:string,
        device_code?:string,device_name?:string,invstd?:string,priority?:string,
        begindate?:string,enddate?:string,dep_name?:string,place?:string,degree?:string,
     };

     const columns:ProColumns<DataType>[]=[
        {dataIndex:'sno',title:'操作顺序'},
        {dataIndex:'code',title:'维修任务号'},{dataIndex:'priority',title:'紧急程度'},
        {dataIndex:'dep_name',title:'部门'},{dataIndex:'place',title:'位置'},
        {dataIndex:'device_code',title:'设备编码'},{dataIndex:'device_name',title:'设备名称'},
        {dataIndex:'invstd',title:'规格型号'},{dataIndex:'degree',title:'维修等级'},
        {dataIndex:'type',title:'类型'},{dataIndex:'sop',title:'SOP'},{dataIndex:'operater_name',title:'维修人'},
        {dataIndex:'status',title:'状态'},
     ];

     const tdata:DataType[]=[
        {sno:1,code:'BY2025001',dep_name:'机加工中心',type:'生产设备',status:'待分配',sop:'《XX加工中心维修作业指导A001》',
         place:'一楼B-2',device_code:'JC20001',device_name:'CNC加工中心',invstd:'C99-225',operater_name:'',
         degree:'维修A级',priority:'特急',},
         {sno:2,code:'BY2025002',dep_name:'机加工中心',type:'生产设备',status:'待分配',sop:'《XX加工中心维修作业指导A001》',
            place:'一楼B-2',device_code:'JC20002',device_name:'CNC加工中心',invstd:'C99-225',operater_name:'张小伟',degree:'维修A级',priority:'紧急',},
            {sno:3,code:'BY2025003',dep_name:'机加工中心',type:'生产设备',status:'进行中…',sop:'《XX加工中心维修作业指导A001》',
                place:'一楼B-2',device_code:'JC20003',device_name:'CNC加工中心',invstd:'C99-225',operater_name:'张小伟',degree:'维修B级',priority:'紧急',},
                {sno:4,code:'BY2025004',dep_name:'研发中心',type:'生产设备',status:'进行中…',sop:'《XX加工中心维修作业指导A001》',
                    place:'二楼C-2',device_code:'YQ202365',device_name:'XX水平仪',invstd:'C99-225',operater_name:'李冰',degree:'维修C级',priority:'一般',},
                    {sno:5,code:'BY2025005',dep_name:'喷漆车间',type:'生产设备',status:'进行中…',sop:'《XX加工中心维修作业指导A001》',
                        place:'二楼C-5',device_code:'JC20001',device_name:'CNC加工中心',invstd:'C99-225',operater_name:'李冰',degree:'维修B级',priority:'一般',},
                        {sno:6,code:'BY2025006',dep_name:'储运部',type:'运输工具',status:'已完成',sop:'《XX加工中心维修作业指导A001》',
                            place:'一楼B-2',device_code:'YS20001',device_name:'叉车',invstd:'HC55666',operater_name:'张小伟',degree:'维修A级',priority:'一般',},
       
     ];
 
    return <>
         <ProCard title='维修任务分派' style={{height:700}}
         >
            
             <ProTable<DataType>
                search={false}
                options={false}
                columns={columns}
                dataSource={tdata}

                />
         </ProCard>
    </>;
};

export default App;